fix(frontend): drop deprecated tsconfig baseUrl (RAN-11)#64
Closed
aksOps wants to merge 1 commit into
Closed
Conversation
TypeScript 5.5 deprecated baseUrl (TS5101). Removing it makes the local `mvn test` / `npm run build` green on Node >= 22 without a silent `ignoreDeprecations` suppression. The `paths` mapping is retained and resolves relative to tsconfig.json under `moduleResolution: "bundler"`, and Vite's `resolve.alias` already handles `@/*` at bundle time. Verified: `npm run build` (tsc -b && vite build) on Node v24.15.0. Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
3 tasks
Contributor
Author
|
Superseded by #66 (RAN-27), which bundles the same tsconfig baseUrl fix together with a new |
aksOps
added a commit
that referenced
this pull request
Apr 25, 2026
…ip (RAN-27) (#66) Two related fixes so `mvn test` / `mvn package` run green from a clean checkout: 1. src/main/frontend/tsconfig.json: remove `"baseUrl": "."`. TypeScript 5.7 emits TS5101 (`Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0`), which aborts `tsc -b` inside frontend-maven-plugin's `npm-build` execution and kills every Maven build. Since TS 4.1, `paths` resolves relative to the tsconfig's own location, so the existing `"@/*": ["./src/*"]` mapping keeps working untouched — and Vite already resolves the same alias via `resolve.alias` in `vite.config.ts`. 2. pom.xml: add a `<frontend.skip>` property (default `false`) and wire `<skip>${frontend.skip}</skip>` into the frontend-maven-plugin configuration. Backend-only contributors can now run `mvn test -Dfrontend.skip=true` and bypass the npm toolchain entirely while CI and release builds continue to bundle the SPA. Acceptance - `mvn test` green from a clean checkout on main - `mvn test -Dfrontend.skip=true` skips the npm executions (verified locally: all three executions short-circuit, BUILD SUCCESS) - `npm run build` under `src/main/frontend/` no longer errors on TS5101 (the previously blocking diagnostic) Subsumes RAN-11 / PR #64 (same tsconfig change) and is the complete fix for the blocker. Co-authored-by: Paperclip <noreply@paperclip.ing>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fixes RAN-11. The frontend
tsconfig.jsonsetsbaseUrl: ".", which TypeScript 5.5+ flags asTS5101(deprecated, removed in TS 7). On Node >= 22 (current LTS),frontend-maven-pluginresolves the latesttypescript@~5.7.xandtsc -bfails, breakingmvn test/mvn packagefor any developer not pinned to Node 20.11.0. CI only survives because the plugin downloads its own pinned Node.Fix
Drop
baseUrlfromsrc/main/frontend/tsconfig.json. Thepathsentry ("@/*": ["./src/*"]) is retained; undermoduleResolution: "bundler"TypeScript resolvespathsrelative to thetsconfig.jsondirectory withoutbaseUrl. Vite already wires@viaresolve.aliasinvite.config.ts, so runtime behavior is unchanged. NoignoreDeprecationssuppression introduced.Verification
cd src/main/frontend && npm run buildsucceeds on Node v24.15.0 (tsc -b+vite build, 3594 modules transformed, 13.67s).npx tsc -b --forceexits 0 with noTS5101/baseUrl/ deprecation warnings.Scope
Single-line deletion in
tsconfig.json.<nodeVersion>inpom.xmlleft onv20.11.0intentionally — tracked separately if we want CI to surface Node-LTS issues earlier.